<?php
include_once dirname(__FILE__)."/pOHA.php";

class Box extends HTMLTable
{
    function Box($title, $content)
    {   
        $c1 = new HTMLTableCell("");
        $c1->setAttribute("class", "boxlefttopborder");
        $c1->setAttribute("height", "15");
        
        $c2 = new HTMLTableCell("<b>".$title."</b>");
        $c2->setAttribute("class", "boxtitle");
        $c2->setAttribute("height", "15");
        $c2->setAttribute("valign", "top");
        
        $c3 = new HTMLTableCell("");
        $c3->setAttribute("class", "boxrighttopborder");
        $c3->setAttribute("height", "15");
        
        $row1 = new HTMLTableRow(array($c1, $c2, $c3));

        $c1 = new HTMLTableCell("");
        $c1->setAttribute("class", "boxleftborder");
        
        $c2 = new HTMLTableCell($content);
        $c2->setAttribute("class", "boxbody");
        
        $c3 = new HTMLTableCell("");
        $c3->setAttribute("class", "boxrightborder");
        
        $row2 = new HTMLTableRow(array($c1, $c2, $c3));
        
        $c1 = new HTMLTableCell("");
        $c1->setAttribute("class", "boxleftbottomborder");
        $c1->setAttribute("height", "15");
        
        $c2 = new HTMLTableCell("");
        $c2->setAttribute("class", "boxbottom");
        $c2->setAttribute("height", "15");
        $c2->setAttribute("valign", "top");
        
        $c3 = new HTMLTableCell("");
        $c3->setAttribute("class", "boxrightbottomborder");
        $c3->setAttribute("height", "15");
        
        $row3 = new HTMLTableRow(array($c1, $c2, $c3));        
        
        parent::HTMLTable(array($row1, $row2, $row3), '', '', '', '0', '0');
        //$this->setAttribute("border", 1);
        $this->setAttribute("width", "100%");
        $this->setAttribute("height", "100%");
    }
}
?>